home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / Caml Light 0.61 / Source / src / lib / printexc.mli < prev    next >
Encoding:
Text File  |  1993-09-24  |  603 b   |  13 lines  |  [TEXT/MPS ]

  1. (* A catch-all exception handler *)
  2.  
  3. value f: ('a -> 'b) -> 'a -> 'b;;
  4.         (* [f fn x] applies [fn] to [x] and returns the result.
  5.            If the evaluation of [fn x] raises any exception, the
  6.            name of the exception is printed on standard error output,
  7.            and the programs aborts with exit code 2.
  8.            Typical use is [f main ()], where [main], with type
  9.            [unit->unit], is the entry point of a standalone program, to catch
  10.            and print stray exceptions.
  11.            For [f] to work properly, the program must be linked
  12.            with the [-g] option. *)
  13.